3.43 \(\int \cos ^3(c+d x) (B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=38 \[ \frac{B \sin (c+d x) \cos (c+d x)}{2 d}+\frac{B x}{2}+\frac{C \sin (c+d x)}{d} \]

[Out]

(B*x)/2 + (C*Sin[c + d*x])/d + (B*Cos[c + d*x]*Sin[c + d*x])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0422158, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {4047, 2635, 8, 12, 2637} \[ \frac{B \sin (c+d x) \cos (c+d x)}{2 d}+\frac{B x}{2}+\frac{C \sin (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(B*x)/2 + (C*Sin[c + d*x])/d + (B*Cos[c + d*x]*Sin[c + d*x])/(2*d)

Rule 4047

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(
C_.)), x_Symbol] :> Dist[B/b, Int[(b*Csc[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x
]^2), x] /; FreeQ[{b, e, f, A, B, C, m}, x]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=B \int \cos ^2(c+d x) \, dx+\int C \cos (c+d x) \, dx\\ &=\frac{B \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} B \int 1 \, dx+C \int \cos (c+d x) \, dx\\ &=\frac{B x}{2}+\frac{C \sin (c+d x)}{d}+\frac{B \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.0622366, size = 35, normalized size = 0.92 \[ \frac{B (2 (c+d x)+\sin (2 (c+d x)))+4 C \sin (c+d x)}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(4*C*Sin[c + d*x] + B*(2*(c + d*x) + Sin[2*(c + d*x)]))/(4*d)

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 38, normalized size = 1. \begin{align*}{\frac{1}{d} \left ( B \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +C\sin \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x)

[Out]

1/d*(B*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+C*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 0.926692, size = 46, normalized size = 1.21 \begin{align*} \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B + 4 \, C \sin \left (d x + c\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*B + 4*C*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 0.474546, size = 72, normalized size = 1.89 \begin{align*} \frac{B d x +{\left (B \cos \left (d x + c\right ) + 2 \, C\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

1/2*(B*d*x + (B*cos(d*x + c) + 2*C)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.18198, size = 111, normalized size = 2.92 \begin{align*} \frac{{\left (d x + c\right )} B - \frac{2 \,{\left (B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*((d*x + c)*B - 2*(B*tan(1/2*d*x + 1/2*c)^3 - 2*C*tan(1/2*d*x + 1/2*c)^3 - B*tan(1/2*d*x + 1/2*c) - 2*C*tan
(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d